import $http from '@/utils/request'

export const aaa = (params) => {
  return $http({
    url: '/warehouse/page',
    params
  })
}
export const radoms = () => {
  return $http({
    url: '/codeFactory/next/CK'
  })
}
export const addHouse = (data) => {
  return $http({
    url: '/warehouse',
    method: 'POST',
    data
  })
}
export const editHouse = (id) => {
  return $http({
    url: `/warehouse/${id}`
  })
}
export const editHouseAPI = (data) => {
  return $http({
    url: '/warehouse',
    method: 'PUT',
    data
  })
}
// area 区域
export const pageDetailListAPI = (params) => {
  return $http({
    url: '/area/pageDetail',
    params
  })
}
// area 添加
export const addAreaApi = () => {
  return $http({
    url: '/warehouse/list?status=1'
  })
}
// area 随机数
export const randomAreaApi = () => {
  return $http({
    url: '/codeFactory/next/KQ'
  })
}
// area 添加
export const addArea = (data) => {
  return $http({
    url: '/area',
    method: 'POST',
    data
  })
}
// area 编辑
export const editArea = (id) => {
  return $http({
    url: `/area/${id}`
  })
}
// area 确认修改
export const editAreaList = (data) => {
  return $http({
    url: '/area',
    method: 'PUT',
    data
  })
}
// loaction 区域

// loaction 添加区域
export const searchLoaction = (params) => {
  return $http({
    url: '/location/pageDetail',
    params
  })
}
// loaction随机数
export const loactionCode = () => {
  return $http({
    url: '/codeFactory/next/KW'

  })
}
// loaction级联
export const loactioncascade = () => {
  return $http({
    url: '/warehouse/list?status=1'
  })
}
// loaction 级联2
export const loactioncascadeChildren = (params) => {
  return $http({
    url: '/area/list',
    params
  })
}
// location 添加
export const addlocation = (data) => {
  return $http({
    url: '/location',
    method: 'POST',
    data
  })
}
// location 修改
export const editlocationList = (data) => {
  return $http({
    url: '/location',
    method: 'PUT',
    data
  })
}

// /location 编辑
export const editlocation = (id) => {
  return $http({
    url: `/location/${id}`
  })
}

// location-view 区域
export const viewApi = () => {
  return $http({
    url: '/warehouse/list?status=1'
  })
}
// location-view 出库缓存区
export const outboundBuffer = (params) => {
  return $http({
    url: '/area/list',
    params
  })
}
// /area/overview/
export const numViewApi = (id) => {
  return $http({
    url: `/area/overview/${id}`
  })
}

